-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3 - include non-dynamic pages in SEO fetching #697
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -77,7 +77,7 @@ export const SLUG_QUERY = groq` | |||
`; | |||
|
|||
export const SEO_SLUG_QUERY = groq` | |||
*[_type == "pageBuilder" && slug.current == $slug][0]{ | |||
*[defined(seo) && slug.current == $slug][0]{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would this transfer for documents where we don't have or want seo? I'm assuming the default SEO would then be the fallback? Say for Legal documents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does not change that behavior. Here we only say that any page with a field seo
should use that data for SEO metadata, otherwise use default SEO. Opting out of SEO for a page, like legal documents, is not currently possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perff
See #694
Currently, SEO data is not fetched for non-dynamic pages. This is becuase the query has a filter on the
pageBuilder
type. This has been changed to filter based on the existence of theseo
field instead. This means that pages such asCompensations
andCustomerCasePage
also get SEO metadata.CustomerCasePage
was missing the seo fields, so this has also been added.Checklist
Please ensure that you’ve completed the following checkpoints before submitting your pull request: